package com.yyl.fmall.order.service;

import com.yyl.fmall.order.entity.Orders;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yyl.fmall.order.vo.AddOrderReturnVo;

/**
 * <p>
 * 订单  服务类
 * </p>
 *
 * @author YuanSir
 * @since 2022-11-09
 */
public interface IOrdersService extends IService<Orders> {
    
    /**
     * 添加订单
     * @param cids 购物车id以逗号分割的字符串 e.g:30,31,32
     * @param orders
     * 例如：{
     *  "actualAmount": 2,
     *  "orderRemark": "来电蒜",
     *  "payType": 1,
     *  "receiverAddress": "湖北 武汉 江夏区 光谷大道77号",
     *  "receiverMobile": "13030303300",
     *  "receiverName": "张三",
     *  "totalAmount": 2,
     *  "userId": "20"
     * }
     * @return
     */
    AddOrderReturnVo add(String cids, Orders orders) throws Exception;
    
    String status(String orderId) throws Exception;
    
    void deleteExpiredOrders();
}
